package com.gufe.controller.user.mp;

import com.gufe.entity.MilitaryShow;
import com.gufe.result.Result;
import com.gufe.service.user.mp.WxMilitaryTrainingService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Slf4j
@RequestMapping("/index")
public class WxMilitaryTrainingController {

    @Autowired
    WxMilitaryTrainingService wxMilitaryTrainingService;

    //获取全部军事训练内容
    @GetMapping("/militraining")
    public Result<List<MilitaryShow>> getmilitraining() {
        log.info("获取全部军事训练内容");
        List<MilitaryShow> list = wxMilitaryTrainingService.getMilitraining();
        return Result.success(list);
    }
}
